package com.message.tcp.ip.socket.configure.service;

import java.sql.SQLException;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.message.tcp.ip.socket.configure.dao.TxnDefDao;
import com.message.tcp.ip.socket.configure.entity.TxnDef;
@Service("txnDefService")
public class TxnDefServiceImp implements TxnDefService {
	private static final Logger logger = Logger.getLogger(TxnDefServiceImp.class);
	@Autowired
	private TxnDefDao txnDefDao;
	public void setTxnDefDao(TxnDefDao txnDefDao){
		this.txnDefDao = txnDefDao;
	}
	@Override
	public void save(TxnDef txnDef) {
		try {
			txnDefDao.save(txnDef);
		} catch (SQLException e) {
			logger.debug("Exception occured while try to save transaction definition", e);
		}
	}

	@Override
	public void saveList(List<TxnDef> list) {
		try {
			txnDefDao.saveList(list);
		} catch (SQLException e) {
			logger.debug("Exception occured while try to save transactions definition",e);
		}
	}

}
